Repository navigation
fix: keep CSV rich text and plain text values consistent - #1300
Open
qiaolezi001 wants to merge 2 commits into
Open
qiaolezi001 wants to merge 2 commits into
qiaolezi001 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the CSV text-synchronization change.
No open issues 🎉
What changed in this PR
Fixes #1297 by keeping CSV cells’ plain-text and rich-text values synchronized, preventing empty or stale text from being exported.
Changes:
- Update both string setters in
CsvCellwhile retaining supplied rich-text instances. - Add 19 regression cases covering XLS/XLSX/CSV, both memory modes, value replacement, blank values, Unicode, escaping, and reopened output files.
| File | Description |
|---|---|
fesod-sheet/src/test/java/org/apache/fesod/sheet/format/CsvRichTextTest.java |
Adds cross-format regressions for text consistency and serialized output. |
fesod-sheet/src/main/java/org/apache/fesod/sheet/metadata/csv/CsvCell.java |
Synchronizes plain-text and rich-text state in both string setters. |
Review effort: Balanced
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
Fixes #1297.
CSV rich-text writes can export an empty value, or the previous plain string when a write handler replaces it with rich text. Keep both CsvCell text representations consistent so CsvSheet serializes the latest value.
What's changed?
Validation
JDK25, project Java8 source/target:
./mvnw clean package -pl fesod-common,fesod-shaded,fesod-sheet: 1,868 tests, zero failures/errors/skips, no test groups excluded, normal fuzz seed regressions included.validate spotless:check, Hawkeye7.0.0 andgit diff --checkpass.One earlier full run failed the untouched LargeDataTest.write timing comparison while builds were running together (27,377ms vs 13,364ms). The exact full command passed in an isolated build window (10,493ms vs 9,015ms). No test or assertion was changed; both runs are retained in the validation records.
Forced Javadoc generation (
-Dmaven.javadoc.skip=false) was also attempted. Common/shaded succeed; sheet reports two existing unresolved links to Lombok-generated methods in unchanged ReadSheetHolder.java:111 and SimpleReadCacheSelector.java:90. This PR does not claim forced Javadoc succeeds or include unrelated doclint changes. No local five-JDK matrix or extended fuzzing campaign was run.Checklist
Generated-by: AI